clt1(population = "rt", r = 3, sample.size = 2, N.iter = 100000)
clt2(population = "runif", a = 0, b = 10, sample.size = 2, N.iter = 100000)
clt3(population = "rgamma", alpha = 1.21, theta = 2.37, sample.size = 2, N.iter = 100000)
sample.size
from the distribution a total of
N.iter
times, and sample means are calculated for each sample. Next follows a histogram of the simulated sample means, which closely approximates the sampling distribution of the sample mean.
Also shown are the sample mean and sample variance of all of the simulated sample means. As a final step, when the user clicks the second plot, a normal curve with the same mean and variance as the simulated sample means is superimposed over the histogram.